package com.hjj.springboot.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.util.Date;

@TableName("t_rider")
@Data
public class Rider {

    @TableId(type = IdType.AUTO)
    @ExcelProperty("骑手编号")
    @ColumnWidth(20)
    private Integer id;     //编号

    @ExcelProperty("用户名")
    @ColumnWidth(20)
    private String name;    //昵称

    @ExcelIgnore
    private String avatarUrl; //头像

    @ExcelIgnore
    private String password;    //密码

    @ExcelIgnore
    private boolean isPass=false; //是否审核通过

    @ExcelProperty("电话号码")
    @ColumnWidth(20)
    private String telNumber; //电话

    @ExcelProperty("注册时间")
    @ColumnWidth(20)
    @JsonSerialize(using=CustomDateTimeSerializer.class)
    private Date registerDate; // 注册日期

    @ExcelProperty("最后登录时间")
    @ColumnWidth(20)
    @JsonSerialize(using=CustomDateTimeSerializer.class)
    private Date lastLoginDate; // 最后登录日期

}
